home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / faq / comp / idl_faq < prev    next >
Internet Message Format  |  1994-02-22  |  32KB

  1. Path: bloom-beacon.mit.edu!hookup!usc!hacgate!sbjse0!8015
  2. From: 8015@sbjse0.sbrc.hac.com (Mike Schienle)
  3. Newsgroups: comp.lang.idl-pvwave,comp.answers,news.answers
  4. Subject: IDL (Interactive Data Language) FAQ
  5. Summary: Frequently-asked questions about the Interactive Data Language (IDL).
  6. Message-ID: <idl-faq_761840134@sbjse0.sbrc.hac.com>
  7. Date: 21 Feb 94 14:15:34 GMT
  8. Sender: news@hacgate.SCG.HAC.COM
  9. Reply-To: mgs@sbjse0.sbrc.hac.com
  10. Followup-To: comp.lang.idl-pvwave
  11. Organization: Hughes Santa Barbara Research Center
  12. Lines: 782
  13. Approved: news-answers-request@MIT.Edu
  14. Supersedes: <idl-faq_759147001@sbjse0.sbrc.hac.com>
  15. Xref: bloom-beacon.mit.edu comp.lang.idl-pvwave:1290 comp.answers:3873 news.answers:15537
  16.  
  17.  
  18. Archive-name: idl-faq
  19. Last-modified: 2/16/94
  20. Version: 2.2
  21.  
  22. Changes since version 2.1:
  23. . Due to resource problems, the lumpi.informatik.uni-dortmund.de site
  24.   is no longer carrying IDL binaries. However, the distribution is now
  25.   available from ftp.Germany.EU.net (192.76.144.75).
  26. . Reference to current IDL version changed from 3.5 to 3.5.1.
  27. . Mention of compressed version of FAQ included.
  28. . Added ESRG to list of FTP sites.
  29.  
  30. This is a list of Frequently Asked Questions about the Interactive Data
  31. Language or IDL.  These questions pop up fairly regularly in the newsgroup
  32. comp.lang.idl-pvwave.  This list is an attempt to cut down on net.traffic
  33. regarding commonly asked questions.  Users are encouraged to read through
  34. this list before posting a query to the newsgroup.
  35.  
  36. As of 12/01/93 Mike Schienle has begun maintaining the IDL FAQ. The
  37. previous IDL FAQ maintainer, Patrick Ryan, has moved on to other work.
  38. Many comments in this FAQ are Pat's, but I have no reason to change
  39. them. (MGS)
  40.  
  41.   A Note from the editor about PV~WAVE:
  42.  
  43.   I do not have any direct experience with PV~WAVE.  As such, I will try to
  44.   minimize comments which appear to favor one package or the other.  I
  45.   will, however, welcome concise descriptions of technical and functional
  46.   differences between the two packages.
  47.  
  48. If you are viewing this text in a GNU Emacs Buffer, you can type
  49. "M-2 C-x $" to get an overview of just the questions.  Then, when you want
  50. to look at the text of the answers, just type "C-x $".
  51.  
  52. This list is roughly divided into two categories: general questions and
  53. technical questions.  General question numbers are prefixed with a "G" and
  54. technical ones with a "T".
  55.  
  56.  
  57.   The following questions are answered:
  58.  
  59.   G01.    What is IDL?
  60.   G02.    Where can I contact them?
  61.   G03.    How do I get IDL?
  62.   G04.    What is the current version of IDL?
  63.   G05.    On what systems does IDL run?
  64.   G06.    What is PV~WAVE and how is it related to IDL?
  65.   G07.    Are there anonymous FTP sites for IDL?
  66.   G08.    How can I get help?
  67.   G09.    Why are there two newsgroups for IDL?
  68.   G10.    Does anyone at RSI read this group?  Is anyone there listening?
  69.   G11.    When is the next version of IDL due out?
  70.   G12.  Are there training courses available for IDL?
  71.   T01.    Why doesn't polycontour fill open contours?
  72.   T02.    How do I increase the number of commands stored in the
  73.   T03.    How do I get IDL to call routines in language X, running
  74.   T04.    Why does XPALETTE edit my color table incorrectly?
  75.   T05.    Is there on-line help for IDL?
  76.   T06.    I run IDL under X in SunOS 4.x, and after I logout, the screen
  77.   T07.    Sometimes my variables seem to disappear.  Why is this?
  78.   T08.    Is there a major mode for editing IDL code in Emacs?
  79.   T09.    How do I get 3-D widgets under OpenLook 3.0?
  80.   T10.    Why does one of the widgets appear red under OpenWindows?
  81.   T11.    Where are all the IDL routines and userlib procedures?
  82.   T12.    Does anybody know how to put multiple image plots on one page in
  83.   T13.    Does case matter in IDL?
  84.   T14.    How do I set up IDL to get precise control over plot window
  85.     and text positioning with either portrait or landscape page
  86.     orientation on a PostScript or HP-GL printer?
  87.   T15.    I get the error message "Code Area Full".  What do I do?
  88.   T16.    Sometimes I get the following error message:
  89.         % Unable to allocate memory: to make array.  not enough core
  90.  
  91.  
  92. ============================================================
  93. GENERAL:
  94.  
  95.  
  96. G01.    What is IDL?
  97.   
  98.     IDL is the Interactive Data Language.  It is a product of
  99.   Research Systems, Inc. (RSI).
  100.   
  101.   The following is quoted from the README file at rsinc.com:/pub/idl/README.
  102.   As such, it describes IDL's capabilities in an understandably subjective
  103.   manner.  ;-)
  104.   
  105.   {begin quote}
  106.       IDL, Interactive Data analysis Language, is a
  107.   complete package for the interactive reduction, analysis,
  108.   and visualization of scientific data and images.  Optimized
  109.   for the workstation environment, IDL integrates a responsive
  110.   array oriented language with numerous data analysis methods
  111.   and an extensive variety of two and three dimensional
  112.   displays into a powerful tool for researchers.
  113.   
  114.     IDL supports an extensive data import capability,
  115.   publication quality hard copy output, and user-defined Motif
  116.   graphical user interfaces.
  117.   
  118.     Users can create complex visualizations in hours
  119.   instead of weeks with the aid of IDL's high level capabilities
  120.   and interactive environment.
  121.   
  122.     IDL is useful in physics, astronomy, image and
  123.   signal processing, mapping, medical imaging, statistics,
  124.   and other technical disciplines requiring visualization of
  125.   large amounts of data.
  126.   {end quote}
  127.   
  128.   Here is a short history of RSI:
  129.       [attributed to ali@rsinc.com (Ali Bahrami)]
  130.   
  131.   {begin quote}
  132.   IDL is a product of Research Systems, Inc., founded in 1977 by David
  133.   Stern.  The origins of IDL were developed at the Laboratory for
  134.   Atmospheric and Space Physics (LASP) at the University of Colorado. David
  135.   was one of the people involved in efforts to make computers easier to use 
  136.   for the physicists at the Lab.  The first program in the evolutionary
  137.   chain to IDL was named Rufus (named after Dave's dog). Rufus was a very
  138.   simple vector oriented calculator that ran on the PDP-12. It accepted 2
  139.   letter codes that specified (1) An arithmetic operation (2) The input
  140.   registers to serve as operands, and (3) the destination register. The
  141.   next version was the Mars Mariner Spectrum Editor (MMED) which was a
  142.   version of Rufus that ran on the PDP-8.
  143.   
  144.   The next program in this line was named SOL, and it also ran on the
  145.   PDP-8.  Unlike its predecessors, SOL was a real computer language with a
  146.   real syntax (no more 2 letter codes). It was an APL influenced array
  147.   oriented language with some primitive graphics capabilities.  The
  148.   resemblance to IDL was there, but very faintly.
  149.   
  150.   In 1977, Dave left LASP to start Research Systems Inc. (RSI) with the
  151.   intention of building on the ideas contained in SOL. The initial result
  152.   of this endeavor was PDP-11 IDL, which was much more capable than SOL.
  153.   Graphics was usually done on Tektronix terminals and outboard raster
  154.   graphics displays. I used this version at LASP in 1981 on a PDP11/34 under 
  155.   RSX-11M in 1981 (I worked as a student at LASP from 1981 to 1987). I
  156.   didn't use it for very long though, because 1981 was the year that Dave
  157.   released the VAX/VMS version of IDL. This version, which was written in
  158.   VAX-11 MACRO and FORTRAN, took advantage of the VAX virtual memory and
  159.   32-bit address space, and was a huge step beyond the PDP-11 version. It
  160.   used essentially the same sort of graphics hardware as the PDP-11.
  161.   
  162.   In 1987, Dave decided that Unix workstations were the direction in which
  163.   IDL should progress, but porting the current VAX IDL to Unix didn't make
  164.   much sense because of its MACRO and FORTRAN implementation.  I had just
  165.   finished my Masters degree and was looking for work.  Dave hired me and
  166.   together we wrote the current version of IDL for Unix on the Sun 3 taking
  167.   advantage of the re-write to extend and improve the language. Since then,
  168.   we've ported it to many Unix machines and moved it back to VMS. RSI has
  169.   many other employees now, but our focus is still the continued
  170.   development of IDL. Recently, IDL was ported to PC class systems running
  171.   Microsoft Windows.
  172.   {end quote}
  173.   
  174.   
  175. G02.    Where can I contact them?
  176.   
  177.     Their address is:
  178.   
  179.     Research Systems, Inc.
  180.         2995 Wilderness Place
  181.     Boulder, CO 80301
  182.     (303) 786-9900      (Voice)
  183.     (303) 786-9909      (Fax)
  184.   
  185.     Email:
  186.         info@rsinc.com or support@rsinc.com         # Internet
  187.         ORION::IDL                                  # SPAN
  188.   
  189.   
  190. G03.    How do I get IDL?
  191.   
  192.     RSI's distribution scheme is unique in that all of the binaries and
  193.   IDL code needed are available via anonymous ftp.  IDL binaries and code
  194.   are available at these sites: 
  195.   
  196.     gateway.rsinc.com (192.5.156.17)
  197.         pub/idl
  198.     boulder.colorado.edu (128.138.240.1)
  199.         pub/idl
  200.     ftp.Germany.EU.net (192.76.144.75)
  201.         shop/CreaSo/IDL
  202.   
  203.   The README file describes which files are needed, how to unpack them, and
  204.   how to install them. 
  205.     If you install IDL without a valid license, you will get IDL's 7
  206.   minute demo mode.  This mode is designed for users who are considering
  207.   buying the package. 
  208.     To actually get IDL running for good, you must pay for a license
  209.   from RSI and follow their instructions.  You will be asked to fill out a
  210.   form with information unique to your machine.  RSI will create a license
  211.   key which the license manager program (lmgrd) reads to validate your
  212.   license.
  213.     As of release 3.1, upgrades to IDL are no longer free.  For details
  214.   about upgrades and support contracts, contact RSI.
  215.   
  216.   
  217. G04.    What is the current version of IDL?
  218.   
  219.     IDL 3.5.1 is the current version.  It was released in December, 1993.
  220.     
  221. G05.    On what systems does IDL run?
  222.   
  223.     The information below is from the file RELEASE_LEVEL located at
  224.   rsinc.com:/pub/idl/RELEASE_LEVEL.  This information applies to release
  225.   3.5.1.
  226.   
  227.   {begin quote}
  228. This release supports the following systems:
  229.  
  230.     - Convex C2 and C3: ConvexOS 10.1.
  231.     - Data General Aviion: DG/UX 5.4.1 and later
  232.     - DEC ALPHA: OSF1 1.2.
  233.     - DOS based personal computers running Microsoft Windows 3.1 or later
  234.     - HP 9000 Series 700: HP-UX 9.01.
  235.     - IBM 6000: AIX 3.2.
  236.     - Apple Macintosh computers running System 7
  237.     - Risc Ultrix: Ultrix 4.2.
  238.     - SGI: IRIX 4.0.5
  239.     - SGI: IRIX 5.1
  240.     - Sun 4 (sparc): SunOS 4.1.1 and Solaris 2.2 (SunOS 5.2).
  241.     - VMS:
  242.           [ALPHA] OpenVMS AXP 1.5.
  243.           [VAX] VMS 5.1 and up. Standard X windows graphics are
  244.         supported at all VMS versions. IDLwidgets are supported
  245.             at VMS 5.4-3 at up *if* the host system has version 1.1
  246.         of the DECWINDOWS-MOTIF package installed.
  247.  
  248.  
  249. The following hardware/operating system combinations are no longer
  250. supported. The last release of these versions have been archived, and no
  251. future development for them will be done:
  252.  
  253.     - Sun 386i (last release: 2.0.4).
  254.     - HP 9000 series 300 and 400 (last release: 3.1.0)
  255.     - VAX Ultrix (last release: 2.2.2)
  256.     - Sun 3 (last release: 3.1.0)
  257.     - MIPS running Risc/OS 4.52B (last release: 3.1.0)
  258.  
  259.   {end quote}
  260.   
  261. G06.    What is PV~WAVE and how is it related to IDL?
  262.   
  263.     Around the time that the Unix version of IDL first became available
  264.   (1988), Precision  Visuals Inc. (PVI) entered into an agreement with RSI
  265.   under which they enhanced and resold IDL under the name PV~WAVE. In
  266.   September of 1990, they exercised an option in that agreement that
  267.   resulted in the following:
  268.   
  269.     - They received a copy of the IDL source code as it existed in
  270.   September 1990 in return for a one-time payment to RSI.
  271.   
  272.     - The connection between RSI and PVI was severed.
  273.   
  274.     IDL and PV~WAVE are now on separate development tracks. Each
  275.   company enhances, supports, and maintains its own product.
  276.   
  277.     PVI has since merged with IMSL and is now Visual Numerics, Inc.
  278.   (VNI).
  279.   
  280.   
  281. G07.    Are there anonymous FTP sites for IDL?
  282.   
  283.   The sites below contain public domain IDL code.
  284.   
  285.     JHU/APL IDL library
  286.     nansen.jhuapl.edu [128.244.147.18]
  287.         /pub/idl
  288.   
  289.     NASA IDL Astronomy User's Library
  290.     idlastro.gsfc.nasa.gov [128.183.57.82]
  291.         /
  292.   
  293.     IUE RDAF library
  294.     iuesn1.gsfc.nasa.gov [128.183.57.16]
  295.     cetus.colorado.edu [128.138.238.151]
  296.         /pub
  297.   
  298.     ICUR Spectral Analysis Software
  299.     ftp.astro.psu.edu [128.118.147.28]
  300.         /pub/nefftp/icur
  301.   
  302.     IDL ROSAT software
  303.     legacy.gsfc.nasa.gov  [128.183.8.233]
  304.     rosat/software/idl
  305.  
  306.     IDLmeteo library
  307.     ftp.sma.ch (141.249.3.33)
  308.         /pub/idlmeteo
  309.  
  310.     ESRG library
  311.     esrg.ucsb.edu [128.111.228.1]
  312.         /pub/idl
  313.   
  314. G08.    How can I get help?
  315.   
  316.     RSI has excellent telephone and email support.  You can contact
  317.   them at: 
  318.  
  319.     Voice:  (303) 786-9900
  320.     Fax:    (303) 786-9909
  321.   
  322.         Email:
  323.         (Internet)
  324.         info@rsinc.com        # general questions
  325.         support@rsinc.com    # technical support
  326.   
  327.         (SPAN)
  328.         ORION::IDL
  329.   
  330.   Keep in mind, however, that RSI's technical support is for their paying
  331.   customers, i.e. those with current support contracts.
  332.   
  333.   
  334. G09.    Why are there two newsgroups for IDL?
  335.   
  336.     Unfortunately, there are two very different packages with the
  337.   abbreviation "IDL".  The newsgroup comp.lang.idl is for the Interface
  338.   Description Language.  The newsgroup for discussing issues related to
  339.   RSI's IDL and VNI's PV~WAVE and IMSL/IDL is comp.lang.idl-pvwave.
  340.   
  341.   
  342. G10.    Does anyone at RSI read this group?  Is anyone there listening?
  343.   
  344.     [ This question was included at the request of RSI.  The answer was
  345.       provided by Ali Bahrami.  -pat ]
  346.   
  347.     {begin quote}
  348.     Yes, many of us do. We're naturally curious what people think of
  349.     our product. We make notes about what people like and dislike and
  350.     this influences our decisions.
  351.   
  352.         However, you usually won't get a direct response from us from
  353.         a posting to this group. There are many reasons for this.
  354.         Here are a couple of the more important ones:
  355.   
  356.           [] We believe that this group should belong solely to the
  357.              user community, and should be free of vendor bias and
  358.              marketing. It should be noted that both RSI and Visual
  359.              Numerics (formerly PVI) have shown great restraint in this
  360.              matter, and that this group is largely left to the actual
  361.              users. (Long term readers will recall some notable exceptions
  362.              to this, but in general it is true.)
  363.   
  364.              It could be argued that as long as the topic stays
  365.              technical, vendor postings are OK. The problem with this
  366.              is that one persons technical posting is another's
  367.              blatant product plug, and the line between them is not
  368.              always obvious.
  369.   
  370.            [] We provide support for our customers via the phone and email.
  371.              If you would like an answer from us, you should
  372.              call us directly. We have no objection to you sharing the
  373.              information you get in this manner with the newsgroup as
  374.              long as you quote us accurately and separate fact from
  375.              conjecture.
  376.   
  377.         In other words, you should view this newsgroup as a way to share
  378.         questions and information with other users, not as a way to
  379.         contact the vendor.
  380.     {end quote}
  381.   
  382. G11.    When is the next version of IDL due out?
  383.   
  384.     IDL 3.5.1 was released in December, 1993.  IDL 4.0 reportedly
  385.     will come out sometime next spring.
  386.  
  387. G12.    Are there training courses available for IDL?
  388.   
  389.   [ This question included at the request of RSI. ]
  390.   
  391.   {begin quote}
  392.       RSI offers a number of IDL training courses for beginning,
  393.   intermediate, and advanced IDL users. IDL courses are scheduled monthly
  394.   at RSI's training facility in Boulder.  On-site IDL courses are also
  395.   available. Contact RSI at 303-786-9900 x 328 or at training@rsinc.com for
  396.   complete scheduling and price information.
  397.   {end quote}
  398.   
  399.   
  400. ============================================================
  401. TECHNICAL QUESTIONS:
  402.   
  403. Note for Sun users:
  404.   
  405. There is a mini FAQ for Sun IDL in $IDL_DIR/notes, and the following
  406. questions are answered in the file openwin3.doc:
  407. (1) IDL complains about missing fonts when creating widgets.
  408. (2) IDL complains about missing bitmap files when creating widgets.
  409. (3) How to make IDL work with OpenWindows version 3.0.
  410. (4) 3-D appearance for OpenLook IDLwidgets.
  411. (5) Why does one of the widgets appear red?
  412. (6) Why does pressing the left button while pointing at a pulldown menu
  413. button cause the menu to pop up with the pushpin in?  Older versions of IDL
  414. didn't to that.
  415. (7) The font used by the list widget is much larger than it used to be, and
  416. I don't like the result on my program.
  417. (8) Why do I get "Cannot allocate colormap entry" errors, and why do they
  418. kill IDL?
  419. (9) I've changed my .Xdefaults file, but nothing different happened. Why?
  420.   
  421.   
  422. T01.    Why doesn't polycontour fill open contours?
  423.   
  424.     This problem is described in the POLYCONTOUR manual page.
  425.   
  426.   {begin quote}
  427.   RESTRICTIONS:
  428.     This routine will NOT draw open contours.  To eliminate open
  429.     contours in your dataset, surround the original array with a 1-element
  430.     border on all sides.  The border should be set to a value less than
  431.     or equal to the minimum data array value.
  432.   
  433.     For example, if A is an (N,M) array enter:
  434.   
  435.         B = REPLICATE(MIN(A), N+2, M+2)    ;Make background
  436.         B(1,1) = A            ;Insert original data
  437.         CONTOUR, B, PATH=Filename ...    ;Create the contour file.
  438.   {end quote}
  439.   
  440.   [ This problem was fixed in IDL 3.1. ]  
  441.   
  442. T02.    How do I increase the number of commands stored in the
  443. history buffer?
  444.   
  445.     The system variable !EDIT_INPUT controls command recall.  By
  446.   default, it is set to 1, causing the last 20 commands to be saved.  If it
  447.   is 0, no commands are saved.  To save more than 20 commands, just put
  448.   !EDIT_INPUT=50 (or other large number) in your startup file. 
  449.   
  450.     It is important to realize that IDL looks at the value of
  451.   !EDIT_INPUT the first time it reads anything from the keyboard, and the
  452.   size of the history buffer is fixed after that. Hence, the command must
  453.   be in a startup file because entering it at the keyboard is too late.
  454.   
  455.   
  456. T03.    How do I get IDL to call routines in language X, running
  457. under system Y?
  458.   
  459.     Jeff Valenti has written a sizable document about calling external
  460.   FORTRAN routines from IDL.  You can find it at
  461.   esrg.ucsb.edu:/pub/idl/idl-fortran.
  462.   
  463.   
  464. T04.    Why does XPALETTE edit my color table incorrectly?
  465.   
  466.     Here is the answer from RSI support:
  467.   
  468.   {begin quote}
  469.   The color applications such as xpalette and xloadct use a common block
  470.   called "colors" to keep track of the color vectors.  When you call tvlct,
  471.   your vectors are loaded into the colormap, but they are not put into the
  472.   colors common block. 
  473.   
  474.   When xpalette starts, it checks to see if the colors have been defined in
  475.   the common block and uses them if they have.  Otherwise it sets them to
  476.   the standard black and white colormap, in which r,g,b are each linear
  477.   ramps. (The colors are as you expect because there is only one colormap.)
  478.   
  479.   Admittedly, this is not the most desirable situation.  You would like
  480.   your colors which you loaded with TVLCT to be recognized by xpalette.  We
  481.   modified xpalette (and xloadct) to use the current colormap when they
  482.   start up by getting the current vectors with TVLCT. 
  483.   
  484.   Another alternative would be to use the following lines to define the
  485.   common block prior to calling your current version of xpalette. 
  486.   
  487.   [ assume here that you have a routine called "restore" which reads colors
  488.     from a file somewhere and creates vectors r, g, and b.  -pat ]
  489.   
  490.   IDL> restore, file='ryan.sav', r, g, b   ;get the vectors from somewhere
  491.   IDL> tvlct, r, g, b
  492.   IDL> common colors, r_orig, g_orig, b_orig, r_curr, g_curr, b_curr
  493.   IDL> r_orig = r & r_curr = r
  494.   IDL> g_orig = g & g_curr = g
  495.   IDL> b_orig = b & b_curr = b
  496.   IDL> xpalette
  497.   
  498.   {end quote}
  499.   
  500. T05.    Is there on-line help for IDL?
  501.   
  502.     Try ?.
  503.   
  504. T06.    I run IDL under X in SunOS 4.x, and after I logout, the screen
  505. becomes completely blank.  Typing in login names and passwords 'blindly'
  506. logs you in again with the 'correct' colors.  How to prevent this?
  507.   
  508.   [Note: This is only a problem under OpenWindows2. -pat ]
  509.   
  510.     Add the following to your .Xdefaults:
  511.   
  512.   Idl*colors:    -5
  513.   
  514.   which reserves some colors for the colormap so that IDL does not exhaust
  515.   all the available colors.  (For a nice summary of Sun IDL interactions
  516.   with OpenWindows, see $IDL_DIR/notes/openwin3.doc)
  517.   
  518.     Another solution is to put a call to clear_colormap in your .login
  519.   file to be executed after OpenWindows start up.
  520.   
  521.   
  522. T07.    Sometimes my variables seem to disappear.  Why is this?
  523.   
  524.   Quoting the IDL User's Guide, page 10-8:
  525.   
  526.   {begin quote}
  527.   IDL users may find that all their variables have seemingly disappeared
  528.   after an error occurs inside a procedure or function.  The misunderstood
  529.   subtlety is that after the error occurs, IDL's context is inside the called
  530.   procedure, not in the main level.  Typing RETALL or RETURN will make the
  531.   lost variables reappear.
  532.   
  533.   RETALL is best suited for use when an error is detected in a procedure and
  534.   it is desired to return immediately to the main program level despite
  535.   nested procedure calls.  RETALL issues RETURN commands until the main
  536.   program level is reached.
  537.   
  538.   The HELP command can be used to see the current call stack (i.e., which
  539.   program unit IDL is in and which program unit called it).
  540.   {end quote}
  541.   
  542.   
  543. T08.    Is there a major mode for editing IDL code in Emacs?
  544.   
  545.     Yes.
  546.     Chris Chase (chase@jackson.jhuapl.edu) has written idl.el for
  547.   editing IDL code.  He has also written idl-shell.el for running IDL as an
  548.   inferior process under emacs.  These can be found at:
  549.   
  550.     esrg.ucsb.edu:pub/idl/idl.el
  551.     esrg.ucsb.edu:pub/idl/idl-shell.el
  552.   
  553.     Lubos Pochman (lubosp@pvi.com) of VNI has developed a PV~WAVE major
  554.   mode.  Given the (remaining) strong similarity between PV~WAVE and IDL,
  555.   it has many of the features that one would like in such a mode.
  556.       It is available via anonymous ftp at these sites:
  557.   
  558.     ftp.pvi.com:/PVI/emacs/
  559.     esrg.ucsb.edu:pub/idl/wave-mode.shar
  560.   
  561.   
  562. T09.    How do I get 3-D widgets under OpenLook 3.0?
  563.   
  564.    This subject is discussed on page 53 of the OpenWindows Version 3
  565.    User's Guide Release Manual.
  566.   
  567.    OpenWindows 3.0 added 3-D appearance for widgets. In order for
  568.    the 3-D look to work, it must be enabled and the background color
  569.    must be a medium tone color such as "grey" or "wheat".
  570.    Add the following resources to your ~/.Xdefaults file:
  571.   
  572.     For plain IDL:
  573.   
  574.         Idl*threeD:     TRUE
  575.         Idl*background: PeachPuff2
  576.   
  577.     For IMSL/IDL:
  578.         Imslidl*threeD:     TRUE
  579.         Imslidl*background: PeachPuff2
  580.   
  581. T10.    Why does one of the widgets appear red under OpenWindows?
  582.   
  583.    This subject is discussed on page 53 of the OpenWindows Version 3
  584.    User's Guide Release Manual.
  585.   
  586.    The OLIT widget toolkit, which is used by IDL, added the
  587.    concept of "mouseless focus" under version 3.0. The red widget
  588.    indicates where the current mouseless focus is. Use the arrow keys
  589.    to traverse the widgets, and the spacebar to make a selection.
  590.   
  591. T11.    Where are all the IDL routines and userlib procedures?
  592.   
  593.   The basic routines are not accessible, for obvious reasons.  The userlib,
  594.   statlib and widget procedures are in $IDL_DIR/lib/.  The procedure XDL also
  595.   displays the full pathname.  The system variable !path also contains the
  596.   directory names for all accessible IDL procedures.
  597.   
  598. T12.    Does anybody know how to put multiple image plots on one page in
  599. PostScript?
  600.   
  601.   Because PostScript has scalable pixels, you must specify the xsize and
  602.   ysize parameters, as well as the position parameter, in TV or TVSCL.
  603.   I don't know about PV-Wave, but the following works in IDL:
  604.   
  605.   ; Display four images in a 2x2 grid
  606.   ; Assume data(x,y,4) = array containing the 4 images
  607.   
  608.   set_plot, 'ps'           ;request PostScript output
  609.   device, ...              ;modify page size, orientation, etc. as desired
  610.   ximsize = 0.5*!d.x_size  ;define output image size
  611.   yimsize = 0.5*!d.y_size  ;note: 0.5 assumes 2x2 grid
  612.   for i=0,3 do begin       ;display the 4 images, using i as position index
  613.      tv, data(*,*,i), i, xsize=ximsize, ysize=yimsize
  614.   endfor
  615.   
  616. T13.    Does case matter in IDL?
  617.   
  618.       No.
  619.       Compiled routines are case insensitive.  The only catch is that, on
  620.   Unix systems, when executing a script via the .RUN command, the file name
  621.   argument must exactly match the file name as it appears on the disk.
  622.   Once the routines in the script are compiled, their names can be written
  623.   in any case.  This is not a problem in operating systems such as VMS that
  624.   do not distinguish case for file names.  This is usually not a problem
  625.   under Unix either since, by convention, most people use lower case file
  626.   names.
  627.   
  628.   
  629. T14.    How do I set up IDL to get precise control over plot window
  630. and text positioning with either portrait or landscape page orientation
  631. on a PostScript or HP-GL printer?
  632.   
  633.   
  634.   (This answer only applies to PostScript and HP-GL printers --
  635.   other printers may differ in having the X and Y offsets measured from
  636.   the upper left corner of the portrait page instead of the lower left
  637.   corner.)
  638.   
  639.   IDL uses portrait page orientation as a default.  (The x axis is along
  640.   the shorter dimension of the paper.)  In portrait orientation the lower
  641.   left corner of the page is the origin for the XOFFSET and YOFFSET page
  642.   offsetting keywords of the DEVICE command that determine the origin
  643.   (lower left corner) of the output window.  (Normally one uses XOFFSET=0
  644.   and YOFFSET=0 for portrait orientation.)  Size of the output window is
  645.   determined by the XSIZE and YSIZE keywords of the DEVICE command.
  646.   The origin for graph positioning variables !P.POSITION and !P.REGION
  647.   is the output window origin.  X and Y coordinates for portrait page
  648.   orientation are shown on the sketch below as upper case X and Y.
  649.   
  650.   
  651.                 ----------
  652.                 |        |   ORIGINAL PORTRAIT PAGE  (Printer only prints on
  653.               Y |        |         OUTPUT WINDOW                  this area.)
  654.                 |        |
  655.                 |   X    |
  656.                 o-----------
  657.                 |    y   + |   OUTPUT WINDOW ROTATED ABOUT LOWER LEFT CORNER
  658.               x |        + |
  659.                 |        + |
  660.                 ------------
  661.                 ++++++++++    OUTPUT WINDOW RESIZED FOR LANDSCAPE ORIENTATION
  662.                      ^
  663.                      |    DIRECTION OF NEEDED OFFSET
  664.   
  665.   
  666.   If device,/landscape is specified, then the output window is rotated
  667.   90 deg. clockwise about the lower left corner of the page.
  668.   In this condition nothing will be plotted on the page, since the
  669.   rotation has carried the output window entirely off the paper as shown
  670.   in the sketch above.  To correct this mismatch, the rotated output window
  671.   must be offset.  XOFFSET AND YOFFSET are still measured in the X and Y
  672.   coordinates of the portrait page, but now represent the position of the
  673.   lower left corner of the rotated (and resized) output window (marked by
  674.   an o above) with respect to the lower left corner of the portrait (actual)
  675.   page.  Hence, one generally uses XOFFSET=0 and
  676.   YOFFSET=long_dimension_of_page for landscape orientation.
  677.   
  678.   In landscape orientation, the coordinates for graph positioning variables
  679.   !P.POSITION and !P.REGION are the lower case x and y coordinates
  680.   shown in the sketch above and having origin marked by the letter o.
  681.   Position of output window origin o on the page is, of course, affected
  682.   by the setting of XOFFSET and YOFFSET, as explained before.  The XSIZE
  683.   and YSIZE (output window size) keywords of the DEVICE command are also
  684.   measured in the x and y directions when in landscape orientation.  The
  685.   resizing of the landscape page generally means interchanging the values
  686.   of XSIZE and YSIZE appropriate for the portrait page.
  687.   
  688.   
  689.   Example of settings for a portrait page:
  690.   
  691.   XPAGE=8.5  &  YPAGE=11.  &  XOFFS=0.  &  YOFFS=0.  ;Inches
  692.   DEVICE,/INCHES,XSIZE=XPAGE,YSIZE=YPAGE,XOFFSET=XOFFS,YOFFSET=YOFFS
  693.   
  694.   Example of settings for a landscape page:
  695.   
  696.   XPAGE=11.  &  YPAGE=8.5  &  XOFFS=0.  &  YOFFS=XPAGE  ;Inches
  697.   DEVICE,/LANDSCAPE,/INCHES,XSIZE=XPAGE,YSIZE=YPAGE,XOFFSET=XOFFS, $
  698.        YOFFSET=YOFFS
  699.   
  700.   Example of setting position and size of a plot window:
  701.   
  702.   X0=1.374  &  Y0=1.283  &  XLEN=3.622  &  YLEN=6.157  ;Inches
  703.   !P.POSITION=[X0/XPAGE,Y0/YPAGE,(X0+XLEN)/XPAGE,(Y0+YLEN)/YPAGE]
  704.   
  705.   Example of setting position and orientation of a text string:
  706.   
  707.   x0=.35  &  y0=.37  ;Inches
  708.   xyouts,x0/xpage,y0/ypage,!stime,orient=90,/normal     ;Date, time
  709.   
  710.   
  711. T15.     I get the error message "Code Area Full".  What do I do?
  712.   
  713.   IDL sets aside a certain amount of memory area for compiling programs.  The
  714.   current code and area sizes can be seen with the HELP command, e.g.
  715.   
  716.         IDL> help
  717.         % At $MAIN$  .
  718.         Code area used: 0% (0/16384),  Symbol area used: 0% (2/4096)
  719.   
  720.   These sizes can be increased with the .SIZE command.  Quoting the IDL User's
  721.   Manual, page 2-11:
  722.   
  723.   {begin quote}
  724.   These sizes represent a compromise between an unlimited program space and
  725.   conservation of memory.  User procedures and functions are compiled in this
  726.   large program area.  After successful compilation, a new memory are of the
  727.   required size is allocated to contain the newly compiled program unit.
  728.   
  729.   Resizing the code and data areas erases the currently compiled main program
  730.   and all mail program variables.  For example, to extend the code and data
  731.   areas to 30000 and 5000 bytes respectively:
  732.   
  733.                         .SIZE 30000 5000
  734.   {end quote}
  735.   
  736.   Getting "Code Area Full" is often an indication that the routine is
  737.   large, and would benefit by decomposition into sub-procedures/functions.
  738.   It's better to avoid use of .SIZE because your code will always work on
  739.   other systems where the users don't use a large .SIZE setting.
  740.   
  741.   
  742. T16.    Sometimes I get the following error message:
  743.  
  744. % Unable to allocate memory: to make array.
  745.  not enough core
  746.   
  747.   RSI support replies:
  748.   
  749.   {begin quote}
  750.   The circumstances described happen when memory becomes fragmented.
  751.   Unfortunately, there is nothing you can do except use less memory in your
  752.   application, or get more for the system to work with. 
  753.   {end quote}
  754.   
  755.   
  756. ============================================================
  757.   
  758.   Disclaimer:
  759.   
  760.   I do not work for RSI and I am in no way answerable to them.  Questions and
  761.   answers in this document are culled from the user community.  No warranty,
  762.   express or implied exists regarding this document.  Permission to copy all
  763.   or part of this work is granted, provided that the copies are not made or
  764.   distributed for resale.
  765.   
  766. This file can always be found at esrg.ucsb.edu [128.111.228.1] in
  767. pub/idl/idl-faq. A compressed version is also stored in this location.
  768. A URL entry for this file would look like:
  769.  
  770. file://esrg.ucsb.edu/pub/idl/idl-faq
  771. file://esrg.ucsb.edu/pub/idl/idl-faq.Z
  772.   
  773.   Additions and corrections should be sent to:
  774.   
  775.       mgs@sbjse0.sbrc.hac.com
  776.   
  777.   -----
  778.     Many thanks to the following for their contributions.
  779.   
  780.     black@breeze.rsre.mod.uk (John Black)
  781.     claflin@claes.space.lockheed.com (Scott Claflin)
  782.     edelsohn@npac.syr.edu (David Edelsohn)
  783.     fireman@iuegtc.DNET.NASA.GOV (Gwyn Fireman)
  784.     gurman@umbra.gsfc.nasa.gov (Joseph B. Gurman)
  785.     jdlb@kukui.IFA.Hawaii.Edu (JF Pitot de La Beaujardiere)
  786.     kashyap@oddjob.uchicago.edu (Vinay Kashyap)
  787.     mayor@vaxine.larc.nasa.gov (Shane Mayor)
  788.     oet@maz.sma.ch (Thomas Oettli)
  789.     rmmoss@Texaco.COM (Robert M. Moss)
  790.     sterne@dublin.llnl.gov (Philip Sterne)
  791.     thompson@serts.gsfc.nasa.gov (William Thompson)
  792.     valenti@soleil.Berkeley.EDU (Jeff Valenti)
  793.   
  794.   
  795. --
  796. Mike Schienle                               Hughes SBRC, Santa Barbara, CA
  797. mgs@sbjse0.sbrc.hac.com                       75 Coromar Drive, M/S B28/87
  798. Voice: (805)562-7466    Fax: (805)562-7881               Goleta, CA  93117
  799.